﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using ArlesInterfaces.Editor;

namespace Arles.src.view
{
    public partial class FOutput : DockContent, IOutput
    {
        int line;

        #region Initialize
        public FOutput()
        {
            InitializeComponent();
        } 

        #endregion

        #region Action Methods
        public void Write(string text)
        {
            tbOutput.Text += "\r\n" + text;
            line += text.Length + 2;
            tbOutput.SelectionStart = line;
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            tbOutput.ScrollToCaret();
        }

        #endregion
    }
}
